package com.icoolkj.ms.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author icoolkj
 * @version 1.0
 * @description 用于登录传递用户名、密码
 * @createDate 2025/02/03 22:30
 */
@Data
public class AuthenticationDTO {

    /**
     * 登录类型（1：用户名密码，2：手机号验证码，3：邮箱验证码）
     */
    @NotNull(message = "loginType不能为空")
    @Schema(description = "登录类型（1：用户名密码，2：手机号验证码，3：邮箱验证码）", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer loginType;

    /**
     * 用户名
     */
    @Schema(description = "用户名（登录类型为1时必填）")
    private String userName;

    /**
     * 密码
     */
    @Schema(description = "密码（登录类型为1时必填）")
    private String password;

    /**
     * 手机号
     */
    @Schema(description = "手机号（登录类型为2时必填）")
    private String phoneNumber;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱（登录类型为3时必填）")
    private String email;

    /**
     * 用户类型
     */
    @NotNull(message = "userType不能为空")
    @Schema(description = "用户类型" , requiredMode = Schema.RequiredMode.REQUIRED)
    protected String userType;

    /**
     * 验证码
     */
    @NotBlank(message = "captcha不能为空")
    @Schema(description = "验证码" )
    private String captcha;

    /**
     * 唯一标识
     */
    @Schema(description = "唯一标识（登录类型为1时必填）" )
    private String uuid;

}
